[codex] Add combined Binance and Polymarket oracle E2E#758
Draft
ByteYue wants to merge 2 commits into
Draft
Conversation
ByteYue
force-pushed
the
codex/sports-score-oracle-poc
branch
from
June 28, 2026 14:47
65d73c4 to
459ebc7
Compare
ByteYue
force-pushed
the
codex/sports-score-oracle-poc
branch
from
July 14, 2026 08:13
3dee0eb to
57c27c8
Compare
ByteYue
force-pushed
the
codex/sports-score-oracle-poc
branch
from
July 18, 2026 10:08
57c27c8 to
6b80d5d
Compare
Remove the legacy continuous query parameter from Binance task URIs and document that binance_index_kline_v1 is inherently continuous. Pin the SDK lockfile to gravity-reth d8cb206f6, and require a new feedId whenever the bucket origin or interval changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR consolidates the Gravity Oracle E2E surface around two capabilities:
indexPriceKlinesclosed buckets throughsourceType=3;sourceType=6.It adds a combined
oracle_demosuite that runs both paths in one Gravity cluster and emits one frontend runtime config.Combined workflow
The suite:
PriceFeedResolver,PolymarketSettlementResolver, and a binary market;demo-config.jsonfor the dashboard.Contract artifact builds are targeted to the source files declared by each Oracle E2E, so unrelated contract tests cannot break the suite.
Continuous-only Binance task model
binance_index_kline_v1is a long-running feed by definition. The task URI no longer carriescontinuous=true; the reth adapter rejects both legacycontinuous=trueandcontinuous=falseso validators cannot disagree between one-shot and continuous nonce semantics.For each
feedId,bucketStartMsandintervalare immutable. Use a newfeedIdwhen either changes. This keeps delivery nonce, bucket time, and confirmed cursor reconciliation monotonic and addresses the failure mode reported inGalxe/gravity-audit#913.Follow-up commit
00668611b6(test(oracle): align demos with continuous-only Binance feeds) updates both E2E configurations, live URI generation, shared test helpers, runbooks, andCargo.lock. The lockfile now pins gravity-reth commitd8cb206f6fromGalxe/gravity-reth#368.Run the deterministic combined demo
Build the binaries, then run:
A later restart can omit
--force-initto reuse cached genesis artifacts.Expected successful assertions include:
Stop the retained cluster with:
Live Binance mode
The standalone
binance_price_feedsuite also supportsBINANCE_PRICE_FEED_MODE=livefor manual demos. Live mode reads recent closed one-minute buckets from Binance public market data and continues writing subsequent closed buckets. It is intentionally separate from deterministic CI and makes outbound requests.BINANCE_API_KEYandBINANCE_SECRET_KEYare not required for this public endpoint.Validation
RUSTFLAGS="--cfg tokio_unstable" cargo check -p gravity_node --locked: passed against gravity-rethd8cb206f6.py_compile.continuous=trueorcontinuous=falsetask URI remains.git diff --check: passed.The full
oracle_demoflow previously passed with one deterministic combined test; this follow-up changes only the Binance URI contract and dependency pin. The reth PR independently passes its relayer and execution-layer test suites after removing fixed mode.Scope boundary
The deterministic E2E proves the complete Gravity transport and contract-consumption path. It does not implement generic intra-epoch dynamic request discovery or automatic mirroring of arbitrary Polymarket UI markets.